#include <iostream>
#include <string>
#include "../src/JsonUtil.h"
#include <jsoncpp/json/json.h>

using std::cout;
using std::endl;
using std::string;
using namespace rpc;

int main(int args, char *argv[])
{
    Json::Value value;
    value["content"] = "hello world";
    value["version"] = 3.10;

    string str = JsonUtil::serialize(value);

    JsonUtil::unserialize(str, value);

    cout << value["content"].asString()
         << ", "
         << value["version"].asFloat() << endl;

    return 0;
}